package chuishop.yiqimaicai.service.Impl;

import chuishop.yiqimaicai.mapper.GoodsHouseMapper;
import chuishop.yiqimaicai.pojo.GoodsHouse;
import chuishop.yiqimaicai.service.GoodsHouseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class GoodsHouseServiceImpl implements GoodsHouseService {

    @Autowired
    private GoodsHouseMapper goodsHouseMapper;
    @Override
    public List<GoodsHouse> findGoodsHouse() {
        return goodsHouseMapper.findGoodsHouse();
    }

    @Override
    public boolean delGoodsHouseByIds(String[] ids) {
        return goodsHouseMapper.delGoodsHouseByIds(ids)>0;
    }

    @Override
    public boolean addGoodsHouse(GoodsHouse goodsHouse) {
        return goodsHouseMapper.addGoodsHouse(goodsHouse)>0;
    }

    @Override
    public boolean updataGoodsHouse(GoodsHouse goodsHouse) {
        return goodsHouseMapper.updataGoodsHouse(goodsHouse)>0;
    }

    @Override
    public List<GoodsHouse> findGoodsHouseByname(String gsname) {
        return goodsHouseMapper.findGoodsHouseByname(gsname);
    }
}
